/*
 * OrderInformationResultInfoHolder.java
 * business
 *
 * Created by ChenTao on 2017/2/28.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.viewholder;

import android.view.View;
import android.widget.TextView;

import com.yidiandao.business.R;
import com.yidiandao.business.data.bean.Order;
import com.yidiandao.business.ui.widget.listview.ViewHolder;
import com.yidiandao.business.utils.UIUtils;

/** 订单结果 订单信息 ViewHolder (订单号 订单金额) */
public class OrderInformationResultInfoHolder extends ViewHolder {

    private TextView mTvOrderNumber;
    private TextView mTvOrderValue;

    @Override
    protected void initView(View rootView) {
        mTvOrderNumber = (TextView) rootView.findViewById(R.id.tv_order_number);
        mTvOrderValue = (TextView) rootView.findViewById(R.id.tv_order_value);
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.item_order_information_result_info;
    }

    public void refreshUI(Order order) {
        mTvOrderNumber.setText(order.getOrderSn());
        mTvOrderValue.setText(
                UIUtils.getString(R.string.shopping_cart_value, order.getOrderAmount()));
    }
}
